package init

import (
	"fmt"
	"user-srv/basic/global"

	"github.com/spf13/viper"
)

func Config() {
	viper.SetConfigFile("../../dev.yaml")
	if err := viper.ReadInConfig(); err != nil {
		panic("配置读取失败")
	}
	if err := viper.Unmarshal(&global.Config); err != nil {
		panic("读取失败")

	}
	fmt.Printf("读取成功")
}
